<template>
<!-- 	<view>
		<view class="love-v" @click="goHouse(item)">
			<image :src="item.imgs" mode=""></image>
			<view class="flex1 love-text">
				<view>{{item.name}}</view>
				<view>{{item.type}}/{{item.point}}m²/{{item.range}}</view>
				<view class="item-box">
					<view v-for="(item1,index1) in item.tabs" :key="index1">
						{{item1}}
					</view>
				</view>
				<view>{{item.price}}/平</view>
			</view>
		</view>
	</view> -->
	<view>
		<view class="guessYou-list"  @click="goHouse(item)">
					 <!-- 左-图 -->
					 <image :src="item.imgs" mode=""></image>
					 <!-- 右-文 -->
					 <view class="guessYou-textBox">
						 <view class="guessYou-title">{{item.name + item.type}}</view>
						 <view class="guessYou-samlltitle">{{item.type+'/'+item.point+'㎡/'+item.area+'/'+item.range}}</view>
						 <view class="guessYou-Btn">
						 	<view class="guessYou-itemBtn" v-for="(item1,index1) in item.tabs" :key="index1">{{item1}}</view>
						 </view>
						 <view class="guessYou-price">{{item.price+'元/平'}}</view>
					 </view>
				 </view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "house-item",
		data() {
			return {

			};
		},
		props:{
			item:{
				type:Object,
				default:()=>({}) 
			}
		},
		methods:{
			//跳转详情
			goHouse(item){
				// 存数据到vuex 
				this.$store.commit('house/changeCurrent',item)
				//存数据到足迹数组
				this.$store.commit('house/addFootPrint',item)
				//跳转页面
				uni.navigateTo({
					url:'/pages/houselist/houselist'
				})
			},
		}
	}
</script>

<style lang="scss" >
.guessYou-list{
 		width: 90%;
 		margin: 0 auto;
 		height: 202rpx;
 		border-bottom: 1px solid #ccc;
 		display: flex;
 		justify-content: space-between;
 		margin-top: 42rpx;
 	}
 	.guessYou-list image{
 		width: 213rpx;
 		height: 156rpx;
		// margin-left: 50rpx;
 		background-color: #4e6cd6;
 	}
 	.guessYou-textBox{
 		width: 400rpx;
 		height: 156rpx;
 		display: flex;
 		flex-direction: column;
 		justify-content: space-between;
 		
 	}
 	.guessYou-title{
 		font-size: 24rpx;
 		font-weight: 600;
 	}
 	.guessYou-samlltitle{
 		font-size: 17rpx;
 	}
 	.guessYou-Btn{
 		display: flex;
 		flex-wrap: wrap;
 	}
 	.guessYou-itemBtn{
 		padding: 5rpx;
 		background-color: #edf0f3;
 		margin-right: 12rpx;
 		color: #8d9eb0;
 		font-size: 16rpx;
 	}
 	.guessYou-price{
 		font-size: 21rpx;
 		color:#a4a4a4;
 	}
    
</style>